﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">	
	<Style x:Key="ButtonFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <Rectangle Margin="2" StrokeThickness="1" Stroke="#60000000" StrokeDashArray="1 2"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="ButtonControlTemplate" TargetType="{x:Type Button}">
    	<Border 
    		x:Name="Border"  
    		CornerRadius="2" 
    		BorderThickness="1"
    		Background="{DynamicResource DarkBrush}" BorderBrush="{DynamicResource DarkPlasticBrush}">
    		<ContentPresenter Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" RecognizesAccessKey="True"/>
    	</Border>
    	<ControlTemplate.Triggers>
    		<Trigger Property="IsKeyboardFocused" Value="true">
    			<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DarkBrush}" />
    		</Trigger>
    		<Trigger Property="IsDefaulted" Value="true">
    			<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DarkBrush}" />
    		</Trigger>
    		<Trigger Property="IsMouseOver" Value="true">
    			<Setter TargetName="Border" Property="Background" Value="{StaticResource MouseOverDarkBrush}" />
    		</Trigger>
    		<Trigger Property="IsPressed" Value="true">
    			<Setter TargetName="Border" Property="Background" Value="{StaticResource PressedDarkBrush}" />
    			<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DarkBrush}" />
    		</Trigger>
    		<Trigger Property="IsEnabled" Value="false">
    			<Setter TargetName="Border" Property="Background" Value="{StaticResource DarkBrush}" />
    			<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DarkPlasticBrush}" />
    			<Setter Property="Foreground" Value="{StaticResource GreyBrush}"/>
    		</Trigger>
    	</ControlTemplate.Triggers>
    </ControlTemplate>

    <Style TargetType="Button">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
        <Setter Property="MinHeight" Value="23"/>
        <Setter Property="MinWidth" Value="23"/>
        <Setter Property="Template" Value="{DynamicResource ButtonControlTemplate}"/>
        <Setter Property="Foreground" Value="White"/>
    </Style>
</ResourceDictionary>